package com.jiezuo.common.config.flowable;

import org.flowable.spring.SpringProcessEngineConfiguration;
import org.flowable.spring.boot.EngineConfigurationConfigurer;
import org.springframework.context.annotation.Configuration;

/**
* @description   flowable配置:为防止生成的流程图中中文乱码
 *               如果使用linux,服务器，需要保证服务有字体库有“宋体”，否则还是会乱码
* @author        庞留杰
* @date          2020/9/21 10:07
* @version       V1.0
**/
@Configuration
public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
    @Override
    public void configure(SpringProcessEngineConfiguration engineConfiguration) {
        engineConfiguration.setActivityFontName("宋体");
        engineConfiguration.setLabelFontName("宋体");//连接线字体
        engineConfiguration.setAnnotationFontName("宋体");
        // engineConfiguration.setIdGenerator(IdUtil::fastSimpleUUID);//自定义ID生成器
    }
}